<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="com.dems.dao.StudentDao"%>
<%@ page import="com.dems.domain.Student"%>
<%@ page import="javax.servlet.http.HttpSession" %>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="css/info_update.css"/>
		<title>修改个人信息</title>
	</head>
	<body>
	<%
        Student student = (Student)request.getSession().getAttribute("student");
        String accountId = student.getStudentNum();
        StudentDao sd = new StudentDao(); 
        Student s = sd.selectOne(accountId);
        	%>
	 <form action="<%=request.getContextPath() %>/UpdateStudentServlet" method="POST">
	 	<table>
			<tr>
				<td>
					学号
				</td>
				<td>
					<input type="text" name="studentNum" value="<%=s.getStudentNum() %>" readonly="readonly">
				</td>
			</tr>
			<tr>
				<td>
					姓名
				</td>
				<td>
					<input type="text" name="studentName" value="<%=s.getStudentName() %>">
				</td>
			</tr>
			<tr>
				<td>
					密码
				</td>
				<td>
					<input type="text" name="studentPassword" value="<%=s.getStudentPassword() %>">
				</td>
			</tr>
			<tr>
				<td>
					宿舍号
				</td>
				<td>
					<input type="text" name="studentDormitory" value="<%=s.getStudentDormitory() %>">
				</td>
			</tr>
			<tr>
				<td>
					手机号
				</td>
				<td>
					<input type="text" name="studentPhone" value="<%=s.getStudentPhone() %>">
				</td>
			</tr>
		</table>
		<div class="test"><input id="btn" type="submit" value="修改"/></div>
		
      </form>
	</body>
</html>